
#include <geometrypool.h>

GeometryPool*   GeometryPool::static_instance = 0;

GeometryPool::GeometryPool()
{
}

GeometryPool* GeometryPool::Get()
{
  if (!GeometryPool::static_instance)
    {
      GeometryPool::static_instance = new GeometryPool();
    }
  return GeometryPool::static_instance;
}

Geometry* GeometryPool::GetGeometry(QString name, unsigned idx)
{
  return _geometries[name][idx];
}

void GeometryPool::Set(QString name, unsigned idx, Geometry *geometry)
{
	CE_SET(_geometries[name][idx], geometry);
}
